home *** CD-ROM | disk | FTP | other *** search
/ PC Advisor 2007 June / PC Advisor 2007 June.iso / FULL / OPENOFFICE / openoffice.exe / openofficeorg2.cab / tocframe3.html.xsl < prev    next >
Extensible Markup Language  |  2006-11-30  |  3KB  |  100 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- =================================================
  3.  
  4. This template is a skeleton for single level TOC pages 
  5. Do not overwrite this ! copy it and complete the missing
  6. code.
  7.  
  8. I use the @ character whereever there is a missing code, so 
  9. you can use a simple find to navigate and find the
  10. places...
  11.  
  12. ====================================================== -->
  13.  
  14. <xsl:stylesheet version="1.0" 
  15.    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  16.     xmlns="http://www.w3.org/1999/xhtml">
  17.  
  18.     <xsl:output method               = "html"
  19.                 media-type           = "text/html"
  20.                 indent               = "yes"
  21.                 doctype-public       = "-//W3C//DTD HTML 4.0 Transitional//EN"
  22.                 omit-xml-declaration = "yes"
  23.                 standalone           = "yes" />
  24.  
  25.         <xsl:include href="../layout.xsl"/>
  26.  
  27.      
  28.      <!-- =============================
  29.                    HTML BODY
  30.      ================================== -->
  31.      
  32.      <xsl:template name="body">
  33.          <xsl:call-template name="toc"/>
  34.      </xsl:template>
  35.      
  36.      
  37.      <xsl:template name="toc">
  38.          <xsl:variable name="doc-count" select="count(/session/content/document)"/>
  39.      
  40.         <table width="{$doc-count * 250}" height="250" border="0" cellpadding="0" cellspacing="0" class="tcolor">
  41.           
  42.           <tr> 
  43.         <td height="50" colspan="{$doc-count * 2 + 2}" class="toctitle">
  44.           <xsl:value-of select="/session/general-info/@title"/>
  45.         </td>
  46.           </tr>
  47.  
  48.         <!-- use this alternative if you do not need to use groups 
  49.         (uncomment to use - and do not forget to comment the group 
  50.         option above...)-->
  51.         
  52.         <tr>
  53.             <xsl:apply-templates select="/session/content/document"/>
  54.             <td colspan="2"></td>
  55.         </tr>
  56.  
  57.         </table>
  58.         
  59.         <!--
  60.              @ post toc html here
  61.         -->
  62.         
  63.         <p class="colback"> </p>
  64.  
  65.      </xsl:template>
  66.      
  67.     <!-- also when using groups, in the end it comes 
  68.     to this template, which is called for each document -->
  69.     <xsl:template match="document">
  70.       
  71.               <!-- image cell -->
  72.         
  73.                 <td width="50" height="200" align="center"> 
  74.                   <p>
  75.                           <xsl:apply-templates select="@icon"/>
  76.                    </p>
  77.                 </td>
  78.       
  79.               <td width="200"><p>
  80.               
  81.               <xsl:apply-templates select="@title">
  82.                 <xsl:with-param name="target" select="'mainframe'"/>
  83.             </xsl:apply-templates>
  84.             <xsl:apply-templates select="@description"/>
  85.             <xsl:apply-templates select="@author"/>
  86.             <xsl:apply-templates select="@create-date"/>
  87.             <xsl:apply-templates select="@update-date"/>
  88.             <xsl:apply-templates select="@filename"/>
  89.             <xsl:apply-templates select="@format"/>
  90.             <xsl:apply-templates select="@pages"/>
  91.             <xsl:apply-templates select="@size"/>
  92.             
  93.         </p> </td>
  94.     
  95.     </xsl:template>
  96.         
  97.  
  98.     
  99. </xsl:stylesheet>
  100.